//#define __FORCE_TRACE__
//#define __FORCE_DEBUG__
//#define __FORCE_INFO__
#define THIS_FILE "comm\fn_notification.sqf"
#include <tmf_constants.h>
#include <tmf_macros.h>

TRACE_1("Start",_this);
TMFPROFILERSTART;

private ["_display", "_status", "_params"];

DEFAULT_PARAM(_display,0,"");
DEFAULT_PARAM(_status,1,"");
if (_display != "") then {
	switch (toLower(_status)) do {
		case "creee": { _status = "TaskCreated";};
		case "assignee": { _status = "TaskAssigned";};
		case "accomplie": { _status = "TaskSucceeded";};
		case "echouee": { _status = "TaskFailed";};
		case "annulee": { _status = "TaskCanceled";};
		case "créée": { _status = "TaskCreated";};
		case "assignée": { _status = "TaskAssigned";};
		case "échouée": { _status = "TaskFailed";};
		case "annulée": { _status = "TaskCanceled";};
		case "created": { _status = "TaskCreated";};
		case "assigned": { _status = "TaskAssigned";};
		case "succeeded": { _status = "TaskSucceeded";};
		case "failed": { _status = "TaskFailed";};
		case "canceled": { _status = "TaskCanceled";};
		case "taskcreated": { _status = "TaskCreated";};
		case "taskassigned": { _status = "TaskAssigned";};
		case "tasksucceeded": { _status = "TaskSucceeded";};
		case "taskfailed": { _status = "TaskFailed";};
		case "taskcanceled": { _status = "TaskCanceled";};
		default { _status = "NotificationMessage";};
	};
	[_status,[_display]] call bis_fnc_showNotification;
};

TRACE("End");
TMFPROFILERSTOP;
